Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow irb switches to set the prompt mode #356

Merged
merged 1 commit into from Aug 8, 2011
Merged

Allow irb switches to set the prompt mode #356

merged 1 commit into from Aug 8, 2011

Conversation

dsedivec
Copy link
Contributor

@dsedivec dsedivec commented Aug 7, 2011

Emacs uses irb --inf-ruby-mode to, among other things, set a specific
prompt mode. However, RVM's irbrc.rb was unconditionally overriding the
prompt mode. The user could still set the prompt mode in ~/.irbrc, but
I didn't see any easy way to check if irb was called with
--inf-ruby-mode or --prompt[-mode] from irbrc, so I'd just be swapping
out one unconditional prompt mode override (:RVM) for another (e.g.
:INF_RUBY) which isn't what I wanted--I should get the nice RVM prompt
when I run irb from a shell but Emacs should also be able to get the
prompt mode it wants.

Hence this change, which only changes PROMPT_MODE if it's set to
:DEFAULT, which should be the case unless the user supplied a prompt
mode on the command line.

Emacs uses irb --inf-ruby-mode to, among other things, set a specific
prompt mode.  However, RVM's irbrc.rb was unconditionally overriding the
prompt mode.  The user could still set the prompt mode in ~/.irbrc, but
I didn't see any easy way to check if irb was called with
--inf-ruby-mode or --prompt[-mode] from irbrc, so I'd just be swapping
out one unconditional prompt mode override (:RVM) for another (e.g.
:INF_RUBY) which isn't what I wanted--I should get the nice RVM prompt
when I run irb from a shell but Emacs should also be able to get the
prompt mode it wants.

Hence this change, which only changes PROMPT_MODE if it's set to
:DEFAULT, which should be the case unless the user supplied a prompt
mode on the command line.
wayneeseguin added a commit that referenced this pull request Aug 8, 2011
Allow irb switches to set the prompt mode
@wayneeseguin wayneeseguin merged commit d5872bc into rvm:master Aug 8, 2011
@pkuczynski pkuczynski modified the milestones: rvm-1.29.6, unknown-old Dec 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants